import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Color;
import javax.swing.SpringLayout;
import java.awt.Component;
import javax.swing.Box;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;


public class StartPanel2 extends JPanel {

	OregonTrailApp parentFrame;
	/**
	 * Create the panel.
	 */
	public StartPanel2(final OregonTrailApp parentFrame) {
		this.parentFrame = parentFrame;
		setBackground(Color.LIGHT_GRAY);
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{46, 83, 0, 75, 44, 75, 31, 0};
		gridBagLayout.rowHeights = new int[]{94, 23, 39, 23, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		setLayout(gridBagLayout);
		
		JLabel lblOregonTrail = new JLabel("OREGON TRAIL");
		GridBagConstraints gbc_lblOregonTrail = new GridBagConstraints();
		gbc_lblOregonTrail.anchor = GridBagConstraints.WEST;
		gbc_lblOregonTrail.fill = GridBagConstraints.VERTICAL;
		gbc_lblOregonTrail.insets = new Insets(0, 0, 5, 5);
		gbc_lblOregonTrail.gridx = 3;
		gbc_lblOregonTrail.gridy = 1;
		add(lblOregonTrail, gbc_lblOregonTrail);
		
		JButton btnNewButton = new JButton("New Game");
		GridBagConstraints gbc_btnNewButton = new GridBagConstraints();
		gbc_btnNewButton.anchor = GridBagConstraints.NORTHWEST;
		gbc_btnNewButton.insets = new Insets(0, 0, 0, 5);
		gbc_btnNewButton.gridx = 1;
		gbc_btnNewButton.gridy = 3;
		add(btnNewButton, gbc_btnNewButton);
		
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				parentFrame.showConfigScreen();
			}
		});
		
		JButton btnNewButton_1 = new JButton("Load Game");
		GridBagConstraints gbc_btnNewButton_1 = new GridBagConstraints();
		gbc_btnNewButton_1.insets = new Insets(0, 0, 0, 5);
		gbc_btnNewButton_1.anchor = GridBagConstraints.NORTHWEST;
		gbc_btnNewButton_1.gridx = 5;
		gbc_btnNewButton_1.gridy = 3;
		add(btnNewButton_1, gbc_btnNewButton_1);
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				parentFrame.showLoadScreen();
			}
		});
	}
}
